/*
*    l3qd - Light, light, lightweight queue
*    Copyright (C) 2024  Marcus Pedersén marcus@marcux.org
*
*    This program is free software: you can redistribute it and/or modify
*    it under the terms of the GNU General Public License as published by
*    the Free Software Foundation, either version 3 of the License, or
*    (at your option) any later version.
*
*    This program is distributed in the hope that it will be useful,
*    but WITHOUT ANY WARRANTY; without even the implied warranty of
*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*    GNU General Public License for more details.
*
*    You should have received a copy of the GNU General Public License
*    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

// Common items shared
// between daemon packages
package daemon

// struct containing config
// read from file
type Config struct {
	Port          int32          `mapstructure:"port"`
	IpListen      string         `mapstructure:"ip_listen"`
	DbFile        string         `mapstructure:"db_file"`
	LogFile       string         `mapstructure:"log_file"`
	CertDir       string         `mapstructure:"cert_directory"`
	Queue         string         `mapstructure:"queue"`
	PollIntervall int            `mapstructure:"poll_intervall"`
	DbBackup      DbBackupConfig `mapstructure:"db_backup"`
}

// Contains backup config
type DbBackupConfig struct {
	Directory string `mapstructure:"db_backup_directory"`
	Hour      int8   `mapstructure:"db_backup_hour"`
	Minute    int8   `mapstructure:"db_backup_minute"`
	MaxCount  int8   `mapstructure:"db_backup_max_count"`
}
